﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Domain.ModelMapper
{
    public class Mapper
    {
        public static BusinessObjects.NccDto Map(Ncc ncc)
        {
            return new BusinessObjects.NccDto()
                       {
                           Id = ncc.Id,
                           HoTen = ncc.HoTen,
                           MaHoSo = ncc.MaHoSo,
                           NgaySinh = ncc.NgaySinh,
                           GioiTinh = ncc.GioiTinh,
                           HienTrang = ncc.HienTrang,
                           NgayTuTranHiSinh = ncc.NgayTuTranHiSinh,
                           MaiTangPhi = ncc.MaiTangPhi,
                           DienTichNhaO = ncc.DienTichNhaO,
                           NamHoTroXD = ncc.NamHoTroXD,
                           SoTienHoTroXayDung = ncc.SoTienHoTroXayDung,
                           NgayNhapNgu = ncc.NgayNhapNgu,
                           IdNguyenQuan = ncc.IdNguyenQuan,
                           IdTruQuan = ncc.IdTruQuan,
                           IdNoiCapTruyLinh = ncc.IdNoiCapTruyLinh,
                           IdLoaiNhaO = ncc.IdLoaiNhaO,
                           Ma = ncc.Ma,
                           NamSinh = ncc.NamSinh,
                           NoiCapTruyLinh = ncc.NoiCapTruyLinh,
                           NguyenQuan = ncc.NguyenQuan,
                           NgayChet = ncc.NgayChet,
                       };
        }

        public static BusinessObjects.DM_LoaiNhaODto Map(DM_LoaiNhaO loaiNhaO)
        {
            return new BusinessObjects.DM_LoaiNhaODto
                       {
                           Id = loaiNhaO.Id,
                           Ten = loaiNhaO.Ten,
                           LoaiDoiTuong = loaiNhaO.LoaiDoiTuong
                       };
        }

        public static BusinessObjects.NhomNccDto Map(NhomNcc nhomNcc)
        {
            return new BusinessObjects.NhomNccDto
                       {
                           Id = nhomNcc.Id,
                           Ten = nhomNcc.Ten,
                           VietTat = nhomNcc.VietTat
                       };
        }

        public static BusinessObjects.XaPhuongDto Map(XaPhuong xaPhuong)
        {
            return new BusinessObjects.XaPhuongDto
                       {
                           Id = xaPhuong.Id,
                           Ten = xaPhuong.Ten,
                           VietTat = xaPhuong.VietTat,
                           IdQuanHuyen = xaPhuong.IdQuanHuyen
                       };
        }
    }
}
